﻿
package org.deft.tween {
	import flash.events.Event;

	public class DTweenEvent extends Event {

		public static const MOTION_START:String = 'motionStart';
		public static const MOTION_STOP:String = 'motionStop';
		public static const MOTION_PAUSE:String = "motionPause";
		public static const MOTION_FINISH:String = 'motionFinish';
		public static const MOTION_CHANGE:String = 'motionChange';
		public static const MOTION_RESUME:String = 'motionResume';
		public static const MOTION_LOOP:String = 'motionLoop';

		public static const MOTION_FINISH_ALL:String = 'motionFinishAll';
		//存放数据用
		public var data:Object;

		/**
		 *
		 * @param	type
		 * @param	data
		 * @param	bubbles
		 * @param	cancelable
		 */
		public function DTweenEvent(type:String, data:Object = null, bubbles:Boolean = false,
									cancelable:Boolean = false) {
			super(type, bubbles, cancelable);
			this.data = data;
		}

		/**
		 *
		 * @return
		 */
		public override function clone():Event {
			return new DTweenEvent(type, data, bubbles, cancelable);
		}

		/**
		 *
		 * @return
		 */
		public override function toString():String {
			return formatToString("DTweenEvent", "type", "data", "bubbles", "cancelable");
		}
	}
}
